package com.parleys.helper;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;

public class ParleysLoadingDialog extends ProgressDialog {

	public ParleysLoadingDialog(final Activity activity) {
		super(activity);
		this.setIndeterminate(true);
		this.setMessage(activity.getString(com.parleys.R.string.loading));

		this.setOnCancelListener(new OnCancelListener() {

			@Override
			public void onCancel(DialogInterface dialog) {
				activity.finish();
			}

		});
	}

}
